package common.annotation;

import java.lang.annotation.Annotation;

/**
 * Created by dong peng on 2017/11/30.
 */
@MyAnotation(value = "b")
public class AnotationTest {

    public static void main(String[] args) {
        Class cl = AnotationTest.class;

        Annotation[] annotations =  cl.getDeclaredAnnotations();
        for(Annotation annotation : annotations) {
            MyAnotation aa = (MyAnotation) annotation;
            System.out.println(aa.name() + ":"+aa.value());
        }
    }
}
